//
//  HXIflyPersonalDataTableHeaderView.m
//  KD
//
//  Created by GaoFei on 16/7/8.
//  Copyright © 2016年 Whx. All rights reserved.
//

#import "HXIflyPersonalDataTableHeaderView.h"

@interface HXIflyPersonalDataTableHeaderView ()
/**
 用户名
 */
@property (weak, nonatomic) IBOutlet UILabel *userNameLabel;
/**
 性别
 */
@property (weak, nonatomic) IBOutlet UIImageView *sexImageView;
/**
 部门
 */
@property (weak, nonatomic) IBOutlet UILabel *departmentLabel;



@end

@implementation HXIflyPersonalDataTableHeaderView

-(void)setMembersModel:(HXGetGroupMembersListModel *)membersModel{

    _membersModel = membersModel;
    
    _userNameLabel.text = _membersModel.PersonName;
    _departmentLabel.text = _membersModel.GroupName;
}

-(void)awakeFromNib{

    self.frame = CGRectMake(0, 0, HXSCREEN_WIDTH, self.height);
}

-(void)layoutSubviews{

    [super layoutSubviews];
    
    
}

/**
 拨打电话
 */
- (IBAction)makeCallBtnAct:(UIButton *)sender {

    [LTAlertView showTitle:self.membersModel.PhoneNum message:nil ButtonTitles:@[@"取消",@"呼叫"] OnTapBlock:^(LTAlertView *alert, NSInteger num) {
        if (num == 1) {
             [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",self.membersModel.PhoneNum]]];
        }

    }];
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
